﻿using DFGK_WMS.Model.Dto;
using DFGK_WMS.Model.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DFGK.IService
{
    public interface IDictItemService
    {
        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="dictItem"></param>
        /// <param name="message"></param>
        /// <returns></returns>
        bool AddDictItem(DictItem dictItem, out string message);
        /// <summary>
        /// 根据字典name查询字典
        /// </summary>
        /// <param name="keyword"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="totalCount"></param>
        /// <returns></returns>
        List<DictItem> GetAllDictItemList(string? keyword, long typeId, int pageIndex, int pageSize, out int totalCount);
        /// <summary>
        /// 显示
        /// </summary>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="totalCount"></param>
        /// <param name="typeid"></param>
        /// <param name="name"></param>
        /// <returns></returns>
        List<MenuDto> GetMenuLists(int pageIndex, int pageSize, out int totalCount, int typeid, string name);
        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="dictItem"></param>
        /// <returns></returns>
        bool UpdDictItem(DictItem dictItem, out string message);
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        bool DelDictItem(long id);
        /// <summary>
        /// 根据主键获取对象
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        DictItem? GetDictItemById(long id);
        /// <summary>
        /// 根据字典类型查询字典项
        /// </summary>
        /// <param name="dictypeId"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="totalCount"></param>
        /// <returns></returns>
        List<DictItem> GetDictItemByDicTypeId(int dictypeId, int pageIndex, int pageSize, out int totalCount);
        /// <summary>
        /// 字典项树
        /// </summary>
        /// <param name="itemName"></param>
        /// <returns></returns>
        List<DictItemDto> GetDictItemTreeByitemName(string? itemName, int typeId);
        /// <summary>
        /// 查询全部
        /// </summary>
        /// <returns></returns>
        List<DictItem> GetDictItems();
    }
}
